/** @jsxImportSource @emotion/react */
import * as React from "react";
import { OriginalViewProps, } from "../../common/base";
import {config设备概况, EntranceSetup, } from "./orcBase";
import { createItem,  } from "../../common/eHelper";
import {useRecordListSubr} from "../../hook/useRecordListSub";
import {InspectionItem, OtherProject} from "./InspectionItem";
import {DrawingsExplan} from "./DrawingsExplan";
import {ConclusionDzglWb} from "./ConclusionDzglWb";
import {DeviceSurveyPrf} from "../editorDJ";


const dlistDrawing=['附页：（检验方案偏离单）','附页：（检验联络单回复件）','附页：（检验意见书回复件）',
       '附页：（其他见证资料）','附页：（ ）'];

const recordPrintList =[
  createItem('Entrance', <EntranceSetup/>),
  // createItem('ProjectList', <ProjectListRq config={VsProjects默认}  label={'目录页'}/>),
  createItem('Survey', <DeviceSurveyPrf config={config设备概况} label={'电站锅炉外部检验结论报告-设备概况'}/>),
  createItem('Conclusion', <ConclusionDzglWb label={'电站锅炉外部检验结论报告-下结论'}/>),

  createItem('InspectionItem', <InspectionItem part={1} label={'电站锅炉外部检验项目表（上）'}/>),
  createItem('WjIspItms_29', <InspectionItem part={2} label={'电站锅炉外部检验项目表（下）'}/>),
  createItem('OtherProject', <OtherProject label={'电站锅炉外部检验项目表 - 其他'} />),

  createItem('DrawingsExplan', <DrawingsExplan table={'联络单'} datalist={dlistDrawing} fulldel={false} label='电站锅炉外部检验附页'/>),
  createItem('_Controller',  <></>),
];

export const OriginalView=
  React.forwardRef((
    { action: modAction,  verId, repId='', rep}
    :OriginalViewProps, ref
  ) => {
    const {list}=useRecordListSubr(ref,rep,recordPrintList,modAction,verId);
    return <React.Fragment>
      {list}
    </React.Fragment>;
  } );
